<template>
	<view>
		<!-- #ifdef MP-WEIXIN -->
		<view v-if="showContainer">
			<page-container 
				:show="showContainer"  
				:duration="false" 
				:overlay="false"  
				@beforeleave="beforeleave"
			></page-container>  
		</view>
		<!-- #endif -->
	</view>
</template>

<script setup>
	import { ref } from 'vue'
	const emits = defineEmits(['back'])
	
	// #ifdef APP-PLUS
	onBackPress(event => {
		if(event.from === 'backbutton') {
			emits('back')
			return true
		} else {
			return false
		}
		
	})
	// #endif
	// #ifdef MP-WEIXIN
	const showContainer = ref(true)
	function beforeleave() {
		showContainer.value = false
		emits('back')
		setTimeout(() => showContainer.value = true, 50)
	}
	// #endif
</script>

<style>
</style>